//
//  QuestionsTableViewCell.m
//  SafeFoodManagerDemo
//
//  Created by ios-1 on 2018/3/7.
//  Copyright © 2018年 bob. All rights reserved.
//

#import "QuestionsTableViewCell.h"

@implementation QuestionsTableViewCell

- (void)awakeFromNib {
    [super awakeFromNib];
    // Initialization code
}
- (void)refreshData:(QuestionsItemData*)itemData item:(QuestionsItem*)item;
{
    self.headLab.text = itemData.name;
    self.contentLab.text = [NSString stringWithFormat:@"%@（%ld分）",item.itemText,item.score];
    if([LoginStatuesModel getUserType] ==2)
    {
        if(item.isAnswer)
        {
            self.statueLab.text = @"已作答";
            self.statueLab.textColor = TBColorProvideBtnbg;
            self.statueImage.image = [UIImage imageNamed:@"答题"];
        }else{
            self.statueLab.text = @"未作答";
            self.statueLab.textColor = [UIColor darkGrayColor];
            self.statueImage.image = [UIImage imageNamed:@"未答题"];
        }
    }else{
        if(item.isMark)
        {
            self.statueLab.text = @"已阅卷";
            self.statueLab.textColor = TBColorProvideBtnbg;
            self.statueImage.image = [UIImage imageNamed:@"答题"];
        }else{
            self.statueLab.text = @"未阅卷";
            self.statueLab.textColor = [UIColor darkGrayColor];
            self.statueImage.image = [UIImage imageNamed:@"未答题"];
        }
    }
}
- (void)setSelected:(BOOL)selected animated:(BOOL)animated {
    [super setSelected:selected animated:animated];

    // Configure the view for the selected state
}

@end
